/*********************************************************
 *********************************************************
 ********************                  *******************
 *************                                ************
 *******                  _oo0oo_                  *******
 ***                     o8888888o                     ***
 *                       88" . "88                       *
 *                       (| -_- |)                       *
 *                       0\  =  /0                       *
 *                     ___/`---'\___                     *
 *                   .' \\|     |// '.                   *
 *                  / \\|||  :  |||// \                  *
 *                 / _||||| -:- |||||- \                 *
 *                |   | \\\  -  /// |   |                *
 *                | \_|  ''\---/''  |_/ |                *
 *                \  .-\__  '-'  ___/-. /                *
 *              ___'. .'  /--.--\  `. .'___              *
 *           ."" '<  `.___\_<|>_/___.' >' "".            *
 *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
 *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
 *      =====`-.____`.___ \_____/___.-`___.-'=====       *
 *                        `=---='                        *
 *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
 *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
 *********************************************************/
package org.jbase.jbsc.commons.core.query;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * Project: jbsc-commons <br/>
 * File: PagerQuery.java <br/>
 * Class: org.jbase.jbsc.commons.core.query.PagerQuery <br/>
 * Description: <描述类的功能>. <br/>
 * Copyright: Copyright (c) 2011 <br/>
 * Company: https://gitee.com/liuzp315 <br/>
 * Makedate: 2020/9/21 下午3:58 <br/>
 *
 * @author popo
 * @version 1.0
 * @since 1.0
 */
public class PagerQuery<T extends Query> implements Serializable {

    public PagerQuery() {
    }

    public PagerQuery(long current) {
        this.current = current;
    }

    public PagerQuery(long current, long size) {
        this.size = size;
        this.current = current;
    }

//    @ApiModelProperty("总记录数")
//    private long total = 0L; //总记录数
    @ApiModelProperty("每页记录数")
    private long size = 10L; //每页记录数
    @ApiModelProperty("当前页号")
    private long current = 1L; //当前页号
    @ApiModelProperty("查询条件的项")
    private T params;

//    @ApiModelProperty("每页记录数，size的别名，默认值为10")
//    public PagerQuery set_p_size(long _p_size) {
//        this.size = _p_size;
//        return this;
//    }
//
//    @ApiModelProperty("当前页号，current的别名，默认值为1")
//    public PagerQuery set_p_no(long _p_no) {
//        this.current = _p_no;
//        return this;
//    }
//
//    @ApiModelProperty("总记录数，total的别名，默认值为0")
//    public PagerQuery set_p_total(long _p_total) {
//        this.total = _p_total;
//        return this;
//    }

//    public long getTotal() {
//        return total;
//    }
//
//    public PagerQuery setTotal(long total) {
//        this.total = total;
//        return this;
//    }

    public long getSize() {
        return size;
    }

    public PagerQuery setSize(long size) {
        this.size = size;
        return this;
    }

    public long getCurrent() {
        return current;
    }

    public PagerQuery setCurrent(long current) {
        this.current = current;
        return this;
    }

    public T getParams() {
        return params;
    }

    public PagerQuery setParams(T params) {
        this.params = params;
        return this;
    }
}
